package com.newcoder.huawei;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

/**
 *  求int型正整数在内存中存储时1的个数
 */
public class HJ15 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int num = Integer.parseInt(in.nextLine());
        String erjinzhi = Integer.toString(num, 2);
        erjinzhi = erjinzhi.replace("0","");
        System.out.println(erjinzhi.length());
    }
}
